package zhjb.platform.web.interceptor;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.ServletActionContext;

import zhjb.platform.core.AppContext;

import com.opensymphony.xwork2.Action;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;

public class LoginCheckInterceptor extends AbstractInterceptor {

	public String intercept(ActionInvocation arg0) throws Exception {
		HttpServletRequest request = ServletActionContext.getRequest();
		AppContext.addMessage("===" + request.getSession().getId());
		if (request.getSession().getAttribute("user") == null) {
			//			return Action.INPUT;
		}
		return arg0.invoke();
	}

}
